Skip to content

Instantly share code, notes, and snippets.

View amesgen's full-sized avatar

amesgen

  • Germany
  • 10:33 (UTC +02:00)
View GitHub Profile
@amesgen
amesgen / Main.hs
Last active August 24, 2024 09:46 — forked from RubenVerg/Main.hs
wasm wizer embed file test
module Main where
import System.IO.Unsafe
import Control.DeepSeq
import Control.Monad
import Control.Exception
file :: String
file = unsafePerformIO $ readFile "/src/Main.hs"
{-# NOINLINE file #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
@amesgen
amesgen / Main.hs
Created July 29, 2021 14:17
minimal AST dumping utility for GHC 9.2
{-# LANGUAGE OverloadedStrings #-}
module Main where
import GHC.Data.Bag
import qualified GHC.Data.EnumSet as EnumSet
import GHC.Data.StringBuffer
import GHC.Hs.Dump
import GHC.Parser
import GHC.Parser.Errors.Ppr