Skip to content

Instantly share code, notes, and snippets.

@gallais
Created March 3, 2017 16:08
Show Gist options
  • Save gallais/fa7f8a749d8b1aea026d2c5fa4f88928 to your computer and use it in GitHub Desktop.
Save gallais/fa7f8a749d8b1aea026d2c5fa4f88928 to your computer and use it in GitHub Desktop.
New COMPILE pragmas in Agda
module Compiled-252 where
data U : Set where
z : U
s : U → U
{-# IMPORT Compiled.URaw #-}
{-# COMPILED_DATA U Compiled.URaw.U Compiled.URaw.Z Compiled.URaw.S #-}
module Compiled-253 where
data U : Set where
z : U
s : U → U
{-# FOREIGN GHC import qualified Compiled.URaw #-}
{-# COMPILE GHC U = data Compiled.URaw.U (Compiled.URaw.Z | Compiled.URaw.S) #-}
module Compiled where
-- open import Compiled-252
open import Compiled-253
pred : U → U
pred z = z
pred (s t) = t
module Compiled.URaw where
data U = Z | S U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment