Last active
November 10, 2020 10:51
-
-
Save nomeata/30450fc3fafa8265a513834b9a72e5e7 to your computer and use it in GitHub Desktop.
issue914 repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
haskellNix = import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}; | |
pkgs = haskellNix.pkgs; | |
project = pkgs.pkgsCross.musl64.haskell-nix.cabalProject({ | |
src = ./.; | |
compiler-nix-name = "ghc8102"; | |
}); | |
in | |
project.issue914.components.exes.issue914 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Foo where | |
import Language.Haskell.TH (Q,Exp) | |
import qualified Language.Haskell.TH.Syntax as TH | |
simpleVersion :: String -> Q Exp | |
simpleVersion version = [|$(TH.lift version)|] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal-version: >=1.10 | |
name: issue914 | |
version: 0.1.0.0 | |
author: TheKK | |
maintainer: [email protected] | |
build-type: Simple | |
executable issue914 | |
main-is: Main.hs | |
build-depends: base >=4 | |
build-depends: template-haskell | |
default-language: Haskell2010 | |
other-modules: Paths_issue914 | |
other-modules: Foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Main where | |
import qualified Language.Haskell.TH.Syntax as TH | |
import Foo | |
main :: IO () | |
-- main = print $( [|$(TH.lift "foo")|] ) | |
main = print $(Foo.simpleVersion "foo") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment